<div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
        <li class="nav-item ">
            <a class="nav-link" href="{% url 'mainapp:news' %}">Новости</a>
        </li>
        <li class="nav-item ">
            <a class="nav-link" href="{% url 'mainapp:courses' %}">Курсы</a>
        </li>
        {% if user.is_authenticated %}
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="ddProfile" role="button" data-toggle="dropdown"
                   aria-haspopup="true" aria-expanded="false">
                    Профиль
                </a>
                <div class="dropdown-menu" aria-labelledby="ddProfile">
                    <a class="dropdown-item" href="{% url 'authapp:edit' %}">Редактировать профиль</a>
                    <a class="dropdown-item" href="#">Мои курсы</a>
                    <div class="dropdown-divider"></div>
                    {% if user.is_staff %}
                        <a class="dropdown-item" href="{% url 'admin:index' %}">Модерация</a>
                    {% endif %}
                    {% if user.is_superuser %}
                        <a class="dropdown-item" href="{% url 'admin:index' %}">Административный раздел</a>
                        <a class="dropdown-item" href="{% url 'mainapp:logs_list' %}">Логи</a>
                    {% endif %}
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="{% url 'authapp:logout' %}">Выход</a>
                </div>
            </li>
        {% else %}
            <li class="nav-item ">
                <a class="nav-link" href="{% url 'authapp:login' %}">Вход</a>
            </li>
        {% endif %}
        <li class="nav-item ">
            <a class="nav-link" href="{% url 'mainapp:contacts' %}">Контакты</a>
        </li>

    </ul>
{#    <span><a href="#"></a> <i class="fas fa-grip-lines-vertical"></i> <a href="#">🇬🇧</a></span>#}
    <div class="row">
        <div class="col p-0 border-right">
            <form action="{% url 'set_language' %}" method="post">
                {% csrf_token %}
                <input name="language" value="ru" type="hidden">
                <button class="btn btn-link" type="submit">🇷🇺</button>
            </form>
        </div>
        <div class="col p-0 border-left">
            <form action="{% url 'set_language' %}" method="post">
                {% csrf_token %}
                <input name="language" value="en" type="hidden">
                <button class="btn btn-link" type="submit">🇬🇧</button>
            </form>
        </div>
    </div>
</div>